package com.globallogic.javatrainings.sergiiivanov.view;

import com.globallogic.javatrainings.sergiiivanov.resources.Messages;

public class TeachersManagementPage extends GUI {

    public void pageAddNewTeacher() {
        show("Adding new teacher");

    }

    public void pageConfirmResumeEntryDelete() {
        show("You are about to remove resume entry\n are you sure to proceed? (Y/N)");
    }

    public void pageResume(String teacherName, String[][] resume) {
        newPage();
        show("Resume of " + teacherName);
        show("Select entry to remove, or other action");
        showTableOrdered(resume, 1);
        showLineOfList(Messages.MENU_BACK, 0);
        showLineOfList("Add resume entry", resume.length + 1);
    }

    public void pageShowCourses(String teacherName, String[] courses) {
        newPage();
        show(teacherName + " assigned to courses:");
        showArrayAsList(courses, 1);
        showLineOfList(Messages.MENU_BACK, 0);
        showLineOfList("Show scores", courses.length + 1);
    }

    public void pageShowTeachersList(String title, String[] teachers) {
        newPage();
        show(title + " > Teachers list");
        showLineOfList(Messages.MENU_BACK, 0);
        showArrayAsList(teachers, 1);
        show("Select teacher for more details or ");
        showLineOfList("Add new teacher", 1 + teachers.length);
    }

    public void pageTeacherDetailsHeader(String title) {
        newPage();
        show(title + " > Teachers > Teacher details");
    }

    public void pageTeacherDetailsMenu(String[] menu) {
        showArrayAsList(menu);
    }

    public void pageConfirmDelete() {
        show("You are about to delete teacher\n" +
                "All references shoul be cleared before deletion:\n" +
                "Assigned courses");
        show("Are you sure to delete teacher? Y/N");
    }

    public void pageScores(String name, String[][] scoreTable) {
        show("Scores given by " + name);
        showTableOrdered(scoreTable, 1);
        showLineOfList(Messages.MENU_BACK, 0);
    }

}
